<?php 
/**
 * 圈子操作
 DROP TABLE IF EXISTS `dict_circle`;
CREATE TABLE `dict_circle` (
  `c_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `master` int(10) unsigned DEFAULT NULL,
  `status` tinyint(2) DEFAULT NULL,
  `intro` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`c_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 */
Class CircleModel extends Model{

	public function selectCircleByCid(int $c_id)
    {
        return $this->where('c_id=' . $c_id)->find();
    }

    public function addCircle($data)
    {
        return $this->add($data);
    }

    public function delCircleByCid(int $c_id)
    {
    	return $this->where('c_id=' . $c_id)->delete();
    }

    public function updateCircle($data)
    {
    	return $this->save($data);
    }
}
 ?>